package bmcsoft.test.collection;
import java.util.Scanner;
import java.util.*;
public class TreeSet22_5 {
    public static void main(String[] args) throws Exception {
        //Create a File instance
        java.io.File file = new java.io.File("C:\\Users\\Alan\\Desktop\\A Lifelong Career.txt");
        Scanner input = new Scanner(file);
        //Create a TreeSet to hold words
        TreeSet<String> words = new TreeSet<String>();
        while (input.hasNext()) {
            words.add(input.next());
        }
        System.out.println(words);
    }
}
